3.3.85 \(\int \cosh ^2(c+d x) (a+b \sinh ^2(c+d x)) \, dx\) [285]

Optimal. Leaf size=61 \[ \frac {1}{8} (4 a-b) x+\frac {(4 a-b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {b \cosh ^3(c+d x) \sinh (c+d x)}{4 d} \]

[Out]

1/8*(4*a-b)*x+1/8*(4*a-b)*cosh(d*x+c)*sinh(d*x+c)/d+1/4*b*cosh(d*x+c)^3*sinh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3270, 393, 205, 212} \begin {gather*} \frac {(4 a-b) \sinh (c+d x) \cosh (c+d x)}{8 d}+\frac {1}{8} x (4 a-b)+\frac {b \sinh (c+d x) \cosh ^3(c+d x)}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cosh[c + d*x]^2*(a + b*Sinh[c + d*x]^2),x]

[Out]

((4*a - b)*x)/8 + ((4*a - b)*Cosh[c + d*x]*Sinh[c + d*x])/(8*d) + (b*Cosh[c + d*x]^3*Sinh[c + d*x])/(4*d)

Rule 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 3270

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a-(a-b) x^2}{\left (1-x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b \cosh ^3(c+d x) \sinh (c+d x)}{4 d}+\frac {(4 a-b) \text {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{4 d}\\ &=\frac {(4 a-b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {b \cosh ^3(c+d x) \sinh (c+d x)}{4 d}+\frac {(4 a-b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=\frac {1}{8} (4 a-b) x+\frac {(4 a-b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {b \cosh ^3(c+d x) \sinh (c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 43, normalized size = 0.70 \begin {gather*} \frac {16 a c+16 a d x-4 b d x+8 a \sinh (2 (c+d x))+b \sinh (4 (c+d x))}{32 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cosh[c + d*x]^2*(a + b*Sinh[c + d*x]^2),x]

[Out]

(16*a*c + 16*a*d*x - 4*b*d*x + 8*a*Sinh[2*(c + d*x)] + b*Sinh[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

Maple [A]
time = 1.04, size = 70, normalized size = 1.15

method result size
derivativedivides \(\frac {b \left (\frac {\sinh \left (d x +c \right ) \left (\cosh ^{3}\left (d x +c \right )\right )}{4}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(70\)
default \(\frac {b \left (\frac {\sinh \left (d x +c \right ) \left (\cosh ^{3}\left (d x +c \right )\right )}{4}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(70\)
risch \(\frac {a x}{2}-\frac {b x}{8}+\frac {{\mathrm e}^{4 d x +4 c} b}{64 d}+\frac {{\mathrm e}^{2 d x +2 c} a}{8 d}-\frac {{\mathrm e}^{-2 d x -2 c} a}{8 d}-\frac {{\mathrm e}^{-4 d x -4 c} b}{64 d}\) \(70\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(b*(1/4*sinh(d*x+c)*cosh(d*x+c)^3-1/8*cosh(d*x+c)*sinh(d*x+c)-1/8*d*x-1/8*c)+a*(1/2*cosh(d*x+c)*sinh(d*x+c
)+1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 76, normalized size = 1.25 \begin {gather*} \frac {1}{8} \, a {\left (4 \, x + \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac {1}{64} \, b {\left (\frac {8 \, {\left (d x + c\right )}}{d} - \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/8*a*(4*x + e^(2*d*x + 2*c)/d - e^(-2*d*x - 2*c)/d) - 1/64*b*(8*(d*x + c)/d - e^(4*d*x + 4*c)/d + e^(-4*d*x -
 4*c)/d)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 59, normalized size = 0.97 \begin {gather*} \frac {b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (4 \, a - b\right )} d x + {\left (b \cosh \left (d x + c\right )^{3} + 4 \, a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x, algorithm="fricas")

[Out]

1/8*(b*cosh(d*x + c)*sinh(d*x + c)^3 + (4*a - b)*d*x + (b*cosh(d*x + c)^3 + 4*a*cosh(d*x + c))*sinh(d*x + c))/
d

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 150 vs. \(2 (49) = 98\).
time = 0.19, size = 150, normalized size = 2.46 \begin {gather*} \begin {cases} - \frac {a x \sinh ^{2}{\left (c + d x \right )}}{2} + \frac {a x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {a \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} - \frac {b x \sinh ^{4}{\left (c + d x \right )}}{8} + \frac {b x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{4} - \frac {b x \cosh ^{4}{\left (c + d x \right )}}{8} + \frac {b \sinh ^{3}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{8 d} + \frac {b \sinh {\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{8 d} & \text {for}\: d \neq 0 \\x \left (a + b \sinh ^{2}{\left (c \right )}\right ) \cosh ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)**2*(a+b*sinh(d*x+c)**2),x)

[Out]

Piecewise((-a*x*sinh(c + d*x)**2/2 + a*x*cosh(c + d*x)**2/2 + a*sinh(c + d*x)*cosh(c + d*x)/(2*d) - b*x*sinh(c
 + d*x)**4/8 + b*x*sinh(c + d*x)**2*cosh(c + d*x)**2/4 - b*x*cosh(c + d*x)**4/8 + b*sinh(c + d*x)**3*cosh(c +
d*x)/(8*d) + b*sinh(c + d*x)*cosh(c + d*x)**3/(8*d), Ne(d, 0)), (x*(a + b*sinh(c)**2)*cosh(c)**2, True))

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 71, normalized size = 1.16 \begin {gather*} \frac {1}{8} \, {\left (4 \, a - b\right )} x + \frac {b e^{\left (4 \, d x + 4 \, c\right )}}{64 \, d} + \frac {a e^{\left (2 \, d x + 2 \, c\right )}}{8 \, d} - \frac {a e^{\left (-2 \, d x - 2 \, c\right )}}{8 \, d} - \frac {b e^{\left (-4 \, d x - 4 \, c\right )}}{64 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x, algorithm="giac")

[Out]

1/8*(4*a - b)*x + 1/64*b*e^(4*d*x + 4*c)/d + 1/8*a*e^(2*d*x + 2*c)/d - 1/8*a*e^(-2*d*x - 2*c)/d - 1/64*b*e^(-4
*d*x - 4*c)/d

________________________________________________________________________________________

Mupad [B]
time = 0.10, size = 38, normalized size = 0.62 \begin {gather*} \frac {a\,x}{2}-\frac {b\,x}{8}+\frac {\frac {a\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )}{4}+\frac {b\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )}{32}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(c + d*x)^2*(a + b*sinh(c + d*x)^2),x)

[Out]

(a*x)/2 - (b*x)/8 + ((a*sinh(2*c + 2*d*x))/4 + (b*sinh(4*c + 4*d*x))/32)/d

________________________________________________________________________________________